package com.erp.system.dao;

import com.erp.system.domain.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserDao {

	UserDO get(Long userId);
	
	List<UserDO> list(Map<String, Object> map);

	int count(Map<String, Object> map);
	
	int save(UserDO user);
	
	int update(UserDO user);
	
	int remove(Long userId);
	
	int batchRemove(Long[] userIds);
	
	Long[] listAllDept();

    List<UserDO> getUsersByDeptIds(@Param("deptids") List<Long> deptids);

    List<UserDO> getlistBymanager();

    List<UserDO> getlistBymanagerOnly();

    List<UserDO> getManager(Long deptId);
}
